class FullScreenGui extends Gui {

  static insId := ''

  __New(opt := '') {
    super.__New('+AlwaysOnTop -Caption +ToolWindow ' opt)
  }

  static Show(showCondition, transparent := unset, bgc := unset, opts := '', *) {
    if !showCondition
      return false
    ins := FullScreenGui(opts)
    IsSet(bgc) && ins.BackColor := bgc
    ins.Show('NA x0 y0 w' A_ScreenWidth ' h' A_ScreenHeight)
    IsSet(transparent) && WinSetTransparent(transparent, ins)
    this.insId := ins.Hwnd
    return true
  }

  static Close() {
    try WinClose('ahk_id' this.insId)
  }
}

class StaticBG extends FullScreenGui {
  static Show(*) {
    if !super.Show(cfg.showStaticBg, , cfg.guiBgc)
      return
    Paste(StaticBG.insId, , false, false)
  }
}

class Mask extends FullScreenGui {
  static Show(*) {
    super.Show(cfg.showMask, cfg.maskInitTransparent, cfg.maskBgc)
  }
}